#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>

int main()
{
  //chdir("/home/lysb666");
  //FILE* fop=fopen("log.txt","w");
  //if(fop==NULL)
  //{
  //perror("open fail\n");
  //return 1;
  //}
    
  
    pid_t ID=fork();
    if(ID==0)
    {
        printf("hello subproc:PID%d:PPID%d\n",getpid(),getppid());
        while(1);
    }
    else if(ID>0)
    {
        printf("hello proc:PID:%dPPID:%d\n",getpid(),getppid());
        while(1);
    }
    return 0;
}
